<template>
  <div id="app" @click="packUp();updated()" onselectstart="return false">
      <punctuality></punctuality>
      <majorMap></majorMap>
      <menuColumn></menuColumn>
      <div id="nested" v-if="nested_page" :class="{z_nes:nested_page}">
          <div class="pla-set-clear" id="set_clear" @click="clearAll();close_url()">&#xe64e;</div>
          <router-view :close="shut"></router-view>
      </div>
      <nameControl v-show="mapState === 9991"></nameControl>
  </div>
</template>
<script>
    import * as vx from 'vuex'
    import majorMap from './components/map/majorMap.vue'
    import menuColumn from './components/menu/menuColumn.vue'
    import punctuality from './components/diagram/diagram.vue'
    import nationSearch from './components/nationSearch/nationSearch.vue'
    import nameControl from './components/map/turnPortName.vue'
    export default {
        name:'app',
        data () {
            return {
                shut:true,
            }
        },
        methods:{
            ...vx.mapActions([
                'clearAll',
                'updated',
                'openAll'
            ]),
            packUp:function () {
                this.shut=!this.shut;
            },
            close_url:function () {
                window.location.href='#/';
                if($('.airlineBack').css('display')==='block'){
                    this.openAll();
                    window.location.href='#/nationSearch';
                }
            }
        },
        mounted:function () {



        },
        computed:{
            ...vx.mapGetters([
                'nested_page',
                'mapState'
            ])
        },
        components:{
            majorMap: majorMap,
            menuColumn: menuColumn,
            punctuality: punctuality,
            nameControl: nameControl
        }
    }
</script>

<style>
    @font-face {
        font-family: 'icon';  /* project id 129360 */
        src: url('//at.alicdn.com/t/font_129360_ccv80hx6hvmo0f6r.eot');
        src: url('//at.alicdn.com/t/font_129360_ccv80hx6hvmo0f6r.eot?#iefix') format('embedded-opentype'),
        url('//at.alicdn.com/t/font_129360_ccv80hx6hvmo0f6r.woff') format('woff'),
        url('//at.alicdn.com/t/font_129360_ccv80hx6hvmo0f6r.ttf') format('truetype'),
        url('//at.alicdn.com/t/font_129360_ccv80hx6hvmo0f6r.svg#iconfont') format('svg');
    }
</style>
